﻿using System;
using System.Collections.Generic;
using MugenInjection.Delegates;

namespace MugenInjection.Interface
{
    /// <summary>
    ///   Represenst the interface that contains information about creating bindings.
    /// </summary>
    public interface IBindingBuilder
    {
        /// <summary>
        ///     Gets the <see cref="IInjector" /> that owns the <see cref="IBindingBuilder" />.
        /// </summary>
        IInjector Injector { get; }

        /// <summary>
        ///     Gets the specified service types.
        /// </summary>
        IList<Type> Services { get; }

        /// <summary>
        ///     Gets the settings.
        /// </summary>
        ISettings Settings { get; }

        /// <summary>
        ///     Indicates that the binding builder is configuring.
        /// </summary>
        bool IsConfiguring { get; }

        /// <summary>
        ///     Occurs before build the current IBindingBuilder.
        /// </summary>
        event BindingBuildingDelegate Building;

        /// <summary>
        ///     Occurs after build current IBindingBuilder.
        /// </summary>
        event BindingBuildedDelegate Builded;

        /// <summary>
        ///     Builds the current <see cref="IBindingBuilder" />.
        /// </summary>
        /// <returns>
        ///     The builded <see cref="IBinding" />.
        /// </returns>
        IBinding Build();
    }
}